function quiz() {
    document.getElementById("Modal-wrapper").style.display = "block";
}

function hideModel() {
    document.getElementById("Modal-wrapper").style.display = "none";
}


function hyh() {
    var xhr = new XMLHttpRequest();

    xhr.open("post", "/app1/dohyh/");

    xhr.send();

    xhr.onreadystatechange = function () {
        if (xhr.readyState == 4) {
            if (xhr.status == 200 || xhr.status == 304) {
                ret = JSON.parse(xhr.responseText);
                obj = document.getElementsByClassName('tiaozhuan')
                obj[0].innerHTML = ret.title1;
                obj[1].innerHTML = ret.title2;
                obj[2].innerHTML = ret.title3;
            }
        }
    }
}
function add_zan(obj) {
    title = document.getElementById('title');

    fd = new FormData();

    fd.append('title',title);

    var xhr = new XMLHttpRequest();

    xhr.open('post','/app1/add_zan/');

    xhr.send(fd);

    xhr.onreadystatechange = function () {
        if (xhr.readyState == 4) {
            if (xhr.status == 200 || xhr.status == 304) {
                ret = JSON.parse(xhr.responseText);
                form  = obj.parent()
                obj.innerHTML = ret.zan;
            }
        }
    }
}